package com.wangc.report.service.impl;

import com.wangc.report.dao.SourceTableMapper;
import com.wangc.report.entity.SourceTableEntity;
import com.wangc.report.service.SourceTableService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;
import java.util.Map;

/**
 * Service实现类
 *
 * @author wangc
 * @email 1620415297@qq.com
 * @date 2020-10-20 14:13:46
 */
@Service("sourceTableService")
public class SourceTableServiceImpl implements SourceTableService {
    @Resource
    private SourceTableMapper sourceTableMapper;

    @Override
    public SourceTableEntity queryObject(Long id) {
        return sourceTableMapper.selectByPrimaryKey(id);
    }

    @Override
    public List<SourceTableEntity> queryList(Map<String, Object> map) {
        return sourceTableMapper.queryList(map);
    }

    @Override
    public int queryTotal(Map<String, Object> map) {
        return sourceTableMapper.queryTotal(map);
    }

    @Override
    public int save(SourceTableEntity sourceTable) {
        return sourceTableMapper.insertSelective(sourceTable);
    }

    @Override
    public int update(SourceTableEntity sourceTable) {
        return sourceTableMapper.updateByPrimaryKeySelective(sourceTable);
    }

    @Override
    public int delete(Long id) {
        return sourceTableMapper.deleteByPrimaryKey(id);
    }

    @Override
    public int deleteBatch(Long[] ids) {
        return sourceTableMapper.deleteBatch(ids);
    }
}
